from django.urls import re_path,path

from recruit.views.CityView import CityHotlistView
from recruit.views.EnterpriseView import *
from recruit.views.RecruitsView import *
from .views import *

urlpatterns = [
    path('city/hotlist/', CityHotlistView.as_view()),
    path('recruits/search/latest/', RecruitsNewView.as_view()),
    path('recruits/search/recommend/', RecruitsRecommendView.as_view()),
    path('enterprise/search/hotlist/', EntertpriseHotlistView.as_view()),
    path('recruits/<int:pk>/', RecruitsIdView.as_view()),
    path('recruits/<int:pk>/visit/', RecruitsIdVisitView.as_view()),
    path('enterprise/<int:pk>/visit/', EnterIdVistView.as_view()),
    path('enterprise/<int:pk>/', EnterpriseIdView.as_view({
        'get': 'retrieve',
        'put': 'update',
        'delete': 'destroy'}
    )),
    path('recruits/search/city/keyword/', RecruitsCityView.as_view()),
    path('enterprise/<int:pk>/collect/', EnterIdCollectView.as_view({
        'post':'post',
    })),
    path('recruits/<int:pk>/collect/', RecruitsIdCollectView.as_view({
        'post':'post',
    })),
    path('enterprise/<int:pk>/cancelcollect/', EnterIdCollectView.as_view({
        'post':'post',
    })),
    path('recruits/<int:pk>/cancelcollect/', RecruitsIdCollectView.as_view({
        'post':'post',
    })),
]